<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
    <title>ddd</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <style type="text/css">
    div,
    span {
        width: 140px;
        height: 140px;
        margin: 20px;
        background: #9999CC;
        border: #000 1px solid;
        float: left;
        font-size: 17px;
        font-family: Roman;
    }
    
    div.mini {
        width: 30px;
        height: 30px;
        background: #CC66FF;
        border: #000 1px solid;
        font-size: 12px;
        font-family: Roman;
    }
    </style>
    <!--引入jquery的js库-->
    <script type="text/javascript" src="js/jquery-1.3.1.js"></script>
</head>

<body>
    <p>Hello</p>
    <p>cruel</p>
    <p>World</p>

    <button id="tihuan">替换</button>
</body>
<script language="JavaScript">
$("#tihuan").click(function(){
	//with : 用什么去替换什么
//  $("p").replaceWith("<input type='button' value='按钮'><br/>");
	//  $("<a href='#'>sohu</a>").replaceAll($("p"));
	$("p").replaceWith("<a href='#'>sohu</a><br/>");
});
</script>

</html>
